package com.hyf.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstanVodutils implements InitializingBean {

    @Value("${aliyun.vod.file.keyid}")
    private String keyid;

    @Value("${aliyun.vod.file.keysecret}")
    private String keysecret;


    // 定已公开的静态常量
    public static String ACCESS_KEY_SECRET;
    public static String ACCESS_KEY_ID;
    // 通过service 注解得到 oss 的id 和密钥
    @Override
    public void afterPropertiesSet() throws Exception {

        ACCESS_KEY_ID=keyid;// oss 的 id 等于 定义的
        ACCESS_KEY_SECRET=keysecret;

    }
}
